<!DOCTYPE html>
<html>
  <head>
    <title>medicalCard.html</title>
	
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
</head>
<style type="text/css">
    body {
        width: 100%;
        height: 100%;
        background: #fff;
    }
    /*表格样式*/
</style>
  <link rel="stylesheet" href="/Hospital/lib/layui-v2.1.6/layui/css/layui.css" media="all">
  <body>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>诊疗卡查看</legend>
    </fieldset>
    <table id="medicalCardTable" class="layui-table"  lay-filter="medicalListen"></table>
  </body>
<script src="/Hospital/lib/jquery.min.js" charset="utf-8"></script>
<script src="/Hospital/lib/layui-v2.1.6/layui/layui.js" charset="utf-8"></script>
<script>
	var medicalCardClientId=JSON.parse(localStorage.getItem("medicalCardClientId"));
	localStorage.removeItem("medicalCardClientId");
	layui.use(['table'],function(){
		var table = layui.table;
		initTable();
		
		function initTable(){
			var height=window.innerHeight*0.8;
            var tableWidth=window.innerWidth*0.14;
			table.render({
				id:"medicalCardTable",
                elem:"#medicalCardTable",
                page:true,
                limit:10,
                center:true,
                height:height,
                cols:[[
					{field:'clientName',width:tableWidth,title:'姓名',align:'center'},
                    {field:'projectName',width:tableWidth,title:'治疗项目',align:'center'},
                    {field:'unitPrice',width:tableWidth,title:'治疗价格/次',align:'center'},
                    {field:'totalNumber',width:tableWidth,title:'执行总次数',align:'center'},
                    {field:'restNumber',width:tableWidth,title:'剩余次数',align:'center'},
                    {field:'startTime',width:tableWidth,title:'开始日期',align:'center'},
                    {field:'deadline',width:tableWidth,title:'截止日期',align:'center'},
                ]],
                url:"/Hospital/medicalCardController/getMedicalCardInfo",
                method:"POST",
                where:medicalCardClientId,
                response:{
                	statusName:"code",
                	statusCode:200,
                	countName:'total',
                	msgName:"msg",
                	dataName:"result"
                }
			});
		}
	});
</script>
</html>
